import Vue from 'vue'
import Router from 'vue-router'
// import set from '@/view/set'
// import left from '@/view/left'
// import right from '@/view/right'

const left = r => require.ensure([], ()=>r(require('@/view/left')), '/')
const right = r => require.ensure([], ()=>r(require('@/view/right')), '/')
const set = r => require.ensure([], ()=>r(require('@/view/set')), '/set')

Vue.use(Router)

export default new Router({
    mode:'history',
    routes: [
        {
            path: '/',
            name: 'main',
            components:{
                left:left,
                right:right
            },
            // alias:'/set'
        },
        {
            path:'/set',
            component:set
        }
    ]
})
